from flask import Flask

import settings
from apps.article.viws import article_bp
from apps.users.views import user_bp1
from apps.users.viws import users_bp
from exts import db, bootstrap


def create_app():
    app = Flask(__name__, template_folder='../templates', static_folder='../static')
    app.config.from_object(settings.DevelopmentConfig)
    db.init_app(app=app)
    bootstrap.init_app(app=app)
    app.register_blueprint(user_bp1)
    app.register_blueprint(article_bp)
    # print(app.url_map)
    return app
